package com.music.core.api;


import com.music.core.model.Album;
import com.music.core.model.MusicLink;
import com.music.core.model.Song;
import com.music.core.model.Album;
import com.music.core.model.MusicLink;
import com.music.core.model.Song;

import java.io.IOException;
import java.util.List;

/**
 * @author haohua
 * @date 2018/2/8
 * 音乐api
 */
public interface MusicApi {


    /**
     * 使用关键词查询歌曲
     *
     * @param keyword 关键子
     * @param page
     * @param needLink 是否需要连接
     * @return
     * @throws IOException
     */
    List<? extends Song> searchMusicSync(String keyword, int page, boolean needLink) throws IOException;


    /**
     * 获取某歌曲id对应的音乐链接
     *
     * @param musicId
     * @return
     * @throws IOException
     */
    MusicLink getMusicLinkByIdSync(String musicId) throws IOException;

    /**
     * 获取某歌曲ids对应的歌曲详细信息
     *
     * @param needLyric
     * @param musicIds
     * @return
     * @throws IOException
     */
    List<? extends Song> getSongDetailInfoByIdsSync(boolean needLyric, String... musicIds) throws IOException;

    /**
     * 获取专辑id对应的专辑信息
     *
     * @param albumId
     * @param needLink
     * @return
     * @throws IOException
     */
    Album getAlbumInfoByIdSync(String albumId, boolean needLink) throws IOException;
}
